package com.yaodian100.ec.product.entity;

/**
 * @author jinwei.lin
 *
 */
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import com.yaodian100.core.common.entity.BaseEntity;

@Entity
@Table(name = "EC_ORDER_COMMENT")
public class OrderComment extends BaseEntity {

	private static final long serialVersionUID = 6173275198766493791L;

	public enum COMMENT_STATUS {
		NEW("00"), PROCESS("10"), APPROVE("90"), FAIL("80");
		String value;

		COMMENT_STATUS(String i) {
			value = i;
		}

		public String getValue() {
			return value;
		}
	}

	@Id
	@GeneratedValue(generator = "seq_ec_order_comment")
	@GenericGenerator(name = "seq_ec_order_comment", strategy = "com.yaodian100.core.common.dao.hibernate.SeqStringGenerator", parameters = {
			@Parameter(name = "sequence", value = "seq_ec_order_comment"), @Parameter(name = "pattern", value = "CM00000000") })
	@Column(name = "cmid", length = 10)
	private String cmid;

	@Column(name = "order_id", length = 13, updatable = false)
	private String orderId;

	@Column(name = "order_detail_id", nullable = false, updatable = false)
	private Long orderDetailId;

	@Column(name = "product_id", length = 10, nullable = false, updatable = false)
	private String productId;

	@Column(name = "member_id", length = 10, nullable = false, updatable = false)
	private String memberId;

	@Column(name = "login_id", length = 100, nullable = false, updatable = false)
	private String loginId;

	@Column(name = "subject", length = 20)
	private String subject;

	@Column(name = "content_data", length = 200)
	private String content;

	@Column(name = "approve_man", length = 255)
	private String approveMan;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "approve_date")
	private Date approveDate;

	@Column(name = "comment_status", length = 2)
	private String commentStatus;

	@Column(name = "receiver_province", length = 20)
	private String receiverProvince;

	@Column(name = "product_name", length = 500)
	private String productName;

	@Column(name = "spec_name", length = 100)
	private String specName;

	@Column(name = "bonus", columnDefinition = "NUMERIC(5)")
	private BigDecimal bonus;

	@Column(name = "score", columnDefinition = "NUMERIC(5)")
	private BigDecimal score;

	@Column(name = "fail_count")
	private int failCount;

	@Column(name = "fail_reason", length = 200)
	private String failReason;

	@Column(name = "hide_yn", length = 1)
	private String hideYn;
	/**
	 * 是否允許评价尺寸 default N , Y：是，N：否
	 */
	@Column(name = "comment_size", length = 1)
	private String commentSize = "N";

	@Column(name = "size_data")
	private String size;

	@Column(name = "main_product_id")
	private String mainProductId;

	public String getCmid() {
		return cmid;
	}

	public void setCmid(String cmid) {
		this.cmid = cmid;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public Long getOrderDetailId() {
		return orderDetailId;
	}

	public void setOrderDetailId(Long orderDetailId) {
		this.orderDetailId = orderDetailId;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public String getLoginId() {
		return loginId;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getApproveMan() {
		return approveMan;
	}

	public void setApproveMan(String approveMan) {
		this.approveMan = approveMan;
	}

	public Date getApproveDate() {
		return approveDate;
	}

	public void setApproveDate(Date approveDate) {
		this.approveDate = approveDate;
	}

	public String getCommentStatus() {
		return commentStatus;
	}

	public void setCommentStatus(String commentStatus) {
		this.commentStatus = commentStatus;
	}

	public String getReceiverProvince() {
		return receiverProvince;
	}

	public void setReceiverProvince(String receiverProvince) {
		this.receiverProvince = receiverProvince;
	}

	public String getSpecName() {
		return specName;
	}

	public void setSpecName(String specName) {
		this.specName = specName;
	}

	public BigDecimal getBonus() {
		return bonus;
	}

	public void setBonus(BigDecimal bonus) {
		this.bonus = bonus;
	}

	public BigDecimal getScore() {
		return score;
	}

	public void setScore(BigDecimal score) {
		this.score = score;
	}

	public int getFailCount() {
		return failCount;
	}

	public void setFailCount(int failCount) {
		this.failCount = failCount;
	}

	public String getFailReason() {
		return failReason;
	}

	public void setFailReason(String failReason) {
		this.failReason = failReason;
	}

	public String getHideYn() {
		return hideYn;
	}

	public void setHideYn(String hideYn) {
		this.hideYn = hideYn;
	}

	public String getCommentSize() {
		return commentSize;
	}

	public void setCommentSize(String commentSize) {
		this.commentSize = commentSize;
	}

	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getMainProductId() {
		return mainProductId;
	}

	public void setMainProductId(String mainProductId) {
		this.mainProductId = mainProductId;
	}

}
